package com.zc.redisson.delayedQueue.message;


import com.zc.redisson.delayedQueue.handler.CommAlarmDelayMessageHandler;
import com.zc.redisson.delayedQueue.handler.DelayMessageHandler;

/**
 * @description 延迟消息类型
 */
public enum DelayMessageType {

    FACTORY_COMM_ALARM("通信告警", CommAlarmDelayMessageHandler.class);

    private final String desc;

    /**
     * 此延时消息的处理器
     */
    private final Class<? extends DelayMessageHandler> handler;

    DelayMessageType(String desc, Class<? extends DelayMessageHandler> handler) {
        this.desc = desc;
        this.handler = handler;
    }

    public String getDesc() {
        return desc;
    }

    public Class<? extends DelayMessageHandler> getHandler() {
        return handler;
    }
}
